﻿
Public Class colorop

    Private Sub options_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        If My.Settings.colorcodeon = "on" Then
            CheckBox1.CheckState = CheckState.Checked
        End If
        If My.Settings.colorcodeon = "off" Then
            CheckBox1.CheckState = CheckState.Unchecked
        End If
        sel1label.ForeColor = My.Settings.nondaycolor
        sel2label.ForeColor = My.Settings.daycolor

    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        If CheckBox1.CheckState = CheckState.Checked Then
            My.Settings.colorcodeon = "on"
        Else
            My.Settings.colorcodeon = "off"
        End If
        My.Settings.Save()
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim colorselect As Color
        ColorDialog1.ShowDialog()
        colorselect = ColorDialog1.Color
        My.Settings.nondaycolor = colorselect
    End Sub

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        Dim colorselect As Color
        ColorDialog1.ShowDialog()
        colorselect = ColorDialog1.Color
        My.Settings.daycolor = colorselect

    End Sub
End Class